home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Science / RLaB / help / find < prev    next >
Text File  |  1994-04-25  |  561b  |  26 lines

  1. find:
  2.  
  3. Syntax:    find ( A )
  4.  
  5. Description:
  6.  
  7.     Find returns a matrix that contains the indices of the
  8.     non-zero elements of the input matrix A.
  9.  
  10.     A common usage for find(), is the selection of matrix elements
  11.     that meet certain criteria.
  12.  
  13.     Example:
  14.  
  15.     > a = rand(4,4)
  16.      a =
  17.      matrix columns 1 thru 4
  18.         0.647      0.665      0.655      0.299  
  19.         0.333     0.0847      0.129      0.265  
  20.        0.0369      0.204       0.91        0.7  
  21.         0.162      0.167      0.112       0.95  
  22.     > x = a[ find( a < .1 ) ]
  23.      x =
  24.      matrix columns 1 thru 2
  25.        0.0369     0.0847  
  26.